home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_olv_riverambient.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  116 lines

  1. # Jones 3D Cog Script
  2. #
  3. # olv_RiverAmbient.cog
  4. #
  5. # Plays a sound at a one or more locations
  6. #
  7. # [IS]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     message    timer
  14.     message    entered
  15.     message    startup
  16.  
  17.     thing        soundPos0        nolink
  18.     thing        soundPos1        nolink
  19.     thing        soundPos2        nolink
  20.     thing        soundPos3        nolink
  21.     thing        soundPos4        nolink
  22.     thing        soundPos5        nolink
  23.     thing        soundPos6        nolink
  24.     thing        soundPos7        nolink
  25.     thing        soundPos8        nolink
  26.     thing        soundPos9        nolink
  27.     thing        soundPos10        nolink
  28.     thing        soundPos11        nolink
  29.     thing        soundPos12        nolink
  30.     thing        soundPos13        nolink
  31.     thing        soundPos14        nolink
  32.     thing        soundPos15        nolink
  33.     thing        soundPos16        nolink
  34.     thing        soundPos17        nolink
  35.     thing        soundPos18        nolink
  36.     thing        soundPos19        nolink
  37.  
  38.     sound        wav0=olv_stream_a.wav    local
  39.  
  40.     float        minDist=5        local
  41.     float        maxDist=25        local
  42.     float        volume=.4        local
  43.     int        cnt            local
  44.     int        stream_snd0        local
  45.     int        stream_snd1        local
  46.     int        stream_snd2        local
  47.     int        stream_snd3        local
  48.     int        stream_snd4        local
  49.     int        stream_snd5        local
  50.     int        stream_snd6        local
  51.     int        stream_snd7        local
  52.     int        stream_snd8        local
  53.     int        stream_snd9        local
  54.     int        stream_snd10        local
  55.     int        stream_snd11        local
  56.     int        stream_snd12        local
  57.     int        stream_snd13        local
  58.     int        stream_snd14        local
  59.     int        stream_snd15        local
  60.     int        stream_snd16        local
  61.     int        stream_snd17        local
  62.     int        stream_snd18        local
  63.     int        stream_snd19        local
  64.     int        ready_on            local
  65.     sector    off_sec
  66.     sector    on_sec
  67. end
  68.  
  69. code
  70.  
  71. # ........................................................................................
  72.  
  73. startup:
  74.  
  75.     settimer(0.5);
  76.     return;
  77.  
  78. # ........................................................................................
  79.  
  80. timer:
  81.  
  82.     for (cnt = 0; cnt <= 19; cnt = cnt+1) 
  83.         {
  84.         stream_snd0[cnt]=-1;
  85.         if (soundPos0[cnt] >= 0)
  86.         {
  87.             stream_snd0[cnt]=PlaySoundThing(wav0, soundPos0[cnt], volume, minDist, maxDist, 0x045);
  88.         }
  89.         ready_on=1;
  90.         }
  91.         
  92.     return;
  93.  
  94. entered:
  95.     If(GetSenderRef() == off_sec)
  96.     {
  97.         for (cnt = 0; cnt <= 19; cnt = cnt+1) 
  98.           {
  99.             if(stream_snd0[cnt]!= -1)
  100.             {
  101.                 StopSound(stream_snd0[cnt], 0.1);
  102.                 stream_snd0[cnt]=-1;
  103.             }
  104.         ready_on=0;
  105.         }
  106.     }
  107.     If(GetSenderRef() == on_sec)
  108.     {
  109.     if(ready_on == 1) return;
  110.         SetTimer(0.1);
  111.     }
  112.     return;
  113.  
  114. end
  115.  
  116.